gusucode.com > 耐品图片管理系统 标准版A > 耐品图片管理系统 标准版A/Admin_Group.asp
<!--#include file="Admin_ChkPurview1.asp"--> <!--#include file="Inc/UpdateData.asp"--> <% '=============================================================== ' 著作权号:中国国家版权局著作权登记号2004SR07385 ' 版权所有:深圳市耐品科技开发有限公司 www.naipin.com ' 联系电话:0755-26611119 81234844 81234845 ' 联系手机:13316911914 ' 联系邮箱:naipin@naipin.com '=============================================================== If Netout.GetCookie("Self")="0" then Behind.WriteErrMsg("<br><li>对不起,您没有管理图片的权限!</li>") Response.End() End If Dim ClassID,TheField,Keywords,Sql,TitleId,ImageId ClassID = Netout.CheckNumeric(Request("ClassID")) TheField = Netout.CheckStr(Request("TheField"),"") Keywords = Netout.CheckStr(Trim(Request("keyword")),"") SpecialId = Netout.CheckNumeric(Request("SpecialID")) Sql="Select TitleId,ClassId,TitleName,iClick,ManuName,AddTime,UpdateTime from NT_title where iCount>0 and Exists(Select [Id] from Nt_ImgBook where TitleId=Nt_Title.TitleId and Passed=1)" if ClassID>0 then Sql = Sql & " and ClassId="&ClassId If SpecialId>0 Then Sql = Sql & " and SpecialId="&SpecialId select case TheField case "Title" if Keywords<>"" then sql=sql&" and TitleName like '%"&Keywords&"%'" case "ManuName" if Keywords<>"" then sql=sql&" and ManuName like '%"&Keywords&"%'" case else if Keywords<>"" then sql=sql&" and (TitleName like '%"&Keywords&"%' Or titleDesc like '%"&Keywords&"%')" end select if Not Netout.Master and Netout.GetCookie("Manage")="0" and Netout.GetCookie("Self")="1" then sql=sql&" and TitleUser='"&Netout.UserName&"'" end if sql=sql&" order by UpdateTime Desc,TitleId desc" %> <html> <head> <title>组图管理</title> <SCRIPT language=javascript> function unselectall(){ if(document.myform.chkAll.checked){ document.myform.chkAll.checked = document.myform.chkAll.checked&0; } } function CheckAll(form){ for (var i=0;i<form.elements.length;i++){ var e = form.elements[i]; if (e.Name != "") e.checked = form.chkAll.checked; } } function ConfirmDel(){ if(document.myform.Action.value=="Del"){ document.myform.action="Admin_ImagesDel.asp"; if(confirm("确定要删除选中的组图吗?本操作是无法恢复的!")) return true; else return false; } } </SCRIPT> <script language="javascript" src="Inc/Pop.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <% Dim rs,str,strFile,CurrentPage Title="管 理 组 图" IF Netout.Master Then Link="<a href='Admin_Add.asp?TypeID=1' class='black'>添加图片</a> | <a href='Admin_User.asp' class='black'>管理用户</a> | <a href='Admin_Class.asp' class='black'>管理分类</a> | <a href='Admin_SiteConfig.asp' class='black'>系统配置</a>" Else Link="<a href='Admin_Add.asp?TypeID=1' class='black'>添加图片</a>" End IF str="?h=n&SpecialID="&SpecialId if ClassID = 0 then if keywords<>"" then str=str&"&keyword="&keywords else if keywords="" then str=str&"ClassID="&ClassID else str=str&"ClassID="&ClassID&"&keyword="&keywords end if end if if TheField<>"" then str=str&"&TheField="&TheField strFile = str CurrentPage = Netout.CheckStr(request.QueryString("page"),1) With Behind .WriteHtmlHead .WriteHtmlTop Title,Link .MaxPerPage = 15 .TopPage = False .BottomPage = True .SqlRecord = sql .InitText = "个组图" .strFileName = strFile&"&" .ShowRecord CurrentPage .ShowSearchForm(strFile) .WriteHtmlEnd End With set Netout=nothing Sub ShowContent(MaxPerPage) %> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <form name="myform" method="Post" action="Admin_ImagesDel.asp" onSubmit="return ConfirmDel();"> <tr> <td colspan="2"><table width="100%" border="0" cellspacing="1" cellpadding="2" class="border"> <tr align="center"> <td class="tdbg1" width="6%">选中</td> <td class="tdbg1">组图标题</td> <td width="90" class="tdbg1">所属分类</td> <td class="tdbg1" width="45">图片数</td> <td class="tdbg1" width="70">上传日期</td> <td class="tdbg1" width="75">图片署名</td> <td class="tdbg1" width="120">操作</td> </tr> <%i=0 set titleID=rs("titleID") set titleName=rs("titleName") set ManuName=rs("ManuName") Dim Rs1 Set Rs1 = Server.CreateObject("adodb.recordset") Do While Not rs.Eof and i<MaxPerPage Rs1.Open "Select Top 1 ImageFile,FileExt from Nt_ImgBook Where TitleId="&TitleId&" and Passed=1 Order By UpdateTime Desc,[Id] Desc",Conn,1,1 if Config.WaterMark(0) = "1" then PicUrl = Config.ImagePath(2)&Rs1("ImageFile") else PicUrl = Config.ImagePath(0)&Replace(Rs1("ImageFile"),".jpg","."&Rs1("FileExt")) end if %> <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#EBEBEB'"> <td align="center"><input name='TitleId' type='checkbox' onClick="unselectall()" id="TitleId" value='<%=TitleId%>'></td> <td title="<img src=<%=PicUrl%> width=100>" style="cursor: hand; padding-left: 5px;"> <a href="Admin_Images.asp?TitleId=<%=TitleId%>" class="black" title="<img src=<%=PicUrl%> width=100>"><%=Netout.CutStr(titleName,50)%></a></td> <td><a href="?ClassId=<%=Rs("ClassId")%>"><%=Conn.Execute("Select ClassName from Nt_ClassName where Id="&Rs("ClassId"))(0)%></a></td> <td align="center"><%=Conn.Execute("Select Count(*) from Nt_ImgBook Where TitleId="&TitleId)(0)%></td> <td align="center"><%=formatdatetime(Rs("AddTime"),2)%></td> <td align="center"><a href="?TheField=ManuName&keyword=<%=ManuName%>"><font color="#000000"><%=ManuName%></font></a></td> <td align="center"> <a href="Admin_ImagesModify.asp?TitleId=<%=TitleId%>" class="black">修改</a> <a href="Admin_ImagesDel.asp?Action=Del&TitleId=<%=TitleId%>" class="black" onclick='return ConfirmDel();'>删除</a> </td> </tr> <% Rs1.Close i=i+1 rs.MoveNext loop Set Rs1 = Nothing %> </table> <br></td> </tr> <tr> <td width="34%" height="20"> <input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox"> 选中本页所有组图</td> <td width="66%"> <input name="submit" type='submit' value='删除选定的组图' style="width: 110px;" onClick="document.myform.Action.value='Del'"> <input name="Action" type="hidden" id="Action" value="Del"> </td> </tr> </form> </table> <% End Sub %>